package com.example.myapplication;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;

public class Test1Activity extends AppCompatActivity {
    Button btn_go;

    @Override
    protected void onCreate(final Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_test1);

        btn_go = findViewById(R.id.btn_go);

        btn_go.setOnClickListener(new View.OnClickListener() {
            @Override
                    public void onClick(View view){

            Intent intent = new Intent ( packageContext:Test1Activity.this,Test2Activity.class);

            String strValue ="Android";
            int intValue = 1010;

            Bundle bundle = new Bundle();
            bundle.putInt("int_key",intValue);
            bundle.putString("str_Key",strValue);
            intent.putExtras(bundle);
            starActivity(intent);

            finish();
        }
    });
}
}
